package ai.people.netmon.warning.service;

import ai.people.netmon.framework.domain.common.NameValueEntity;
import ai.people.netmon.framework.domain.common.TypeValueEntity;
import ai.people.netmon.framework.domain.warning.entity.WarningSubjectAnalysis;
import ai.people.netmon.framework.domain.warning.request.subject.SubjectModelRequest;
import ai.people.netmon.framework.domain.warning.vo.TrendAnalysisRespVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * @author ligua
 * @description 针对表【warning_subject_analysis(预警主题分析关系表)】的数据库操作Service
 * @createDate 2022-07-28 17:50:38
 */
public interface WarningSubjectAnalysisService extends IService<WarningSubjectAnalysis> {


    /**
     * 添加主题分析
     *
     * @param warningSubjectAnalysis 警告主题分析
     */
    void addSubjectAnalysis(WarningSubjectAnalysis warningSubjectAnalysis);


    /**
     * 删除主题分析
     *
     * @param userId    用户id
     * @param subjectId 对象id
     */
    void deleteSubjectAnalysis(Long userId, Long subjectId);

    /**
     * 情感分析
     *
     * @param reqParam 要求参数
     * @return {@link List}<{@link TypeValueEntity}<{@link String}, {@link String}>>
     */
    List<TypeValueEntity<String, Long>> emotionAnalysis(SubjectModelRequest reqParam);

    /**
     * 源分析
     *
     * @param reqParam 要求参数
     * @return {@link List}<{@link TypeValueEntity}<{@link String}, {@link String}>>
     */
    List<TypeValueEntity<String, Long>> sourceAnalysis(SubjectModelRequest reqParam);

    /**
     * 趋势分析
     *
     * @param reqParam 要求参数
     * @return {@link List}<{@link TrendAnalysisRespVO}>
     */
    List<TrendAnalysisRespVO> trendAnalysis(SubjectModelRequest reqParam);

    /**
     * 关键词分析
     *
     * @param reqParam 要求参数
     * @return {@link List}<{@link NameValueEntity}<{@link String}, {@link String}>>
     */
    List<NameValueEntity<String, Double>> keywordAnalysis(SubjectModelRequest reqParam);

    /**
     * 标签分析
     *
     * @param reqParam 要求参数
     * @return {@link List}<{@link TrendAnalysisRespVO}>
     */
    List<TrendAnalysisRespVO> tagAnalysis(SubjectModelRequest reqParam);
}
